//
//  BaseViewController.h
//  联付商圈
//
//  Created by 于洋 on 2017/7/14.
//  Copyright © 2017年 lianfu. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface BaseViewController : UIViewController

@property (nonatomic, weak) UITextField *activeTextField;
@property (nonatomic, weak) UITextView *activeTextView;
@property (nonatomic, weak) UISearchBar *activeSearchBar;
@property (nonatomic, weak) UIScrollView *activeScrollView;
@property (nonatomic, assign) BOOL observeKeyboard;

- (void)prepareData;
- (void)reloadView;
- (void)refreshView;
- (void)popViewController;

/**
    创建一个UILabel,参数:
    1.内容
    2.字号
    3.文字颜色
    4.对齐方式
 */
- (UILabel *)makeLabelWithText:(NSString *)text
                          Font:(UIFont *)font
                     TextColor:(UIColor *)textColor
                 TextAlignment:(NSTextAlignment)textAlignment;
/**
    计算文字宽度,参数:
    1.文字内容
    2.字号
    3.label高度
 */
- (CGFloat)calculateRowWidth:(NSString *)string
                    FontSize:(NSInteger)fontSize
                      Height:(CGFloat)height;


- (void)keyboardWillShow:(NSNotification *)notification;
- (void)keyboardWillHide:(NSNotification *)notification;

@end
